#include<bits/stdc++.h>
#include "Vector.h"
using namespace std;

 Vector<int> a,b,c;

void test_printsize(const Vector <int> & a){
    cout <<"size:"<<a.size()<<endl;
}

void test_printcapacity(const Vector <int> & a){
    cout <<"capacity:"<<a.capacity()<<endl;
}

void test_print(const Vector <int> & a){
    for(int i=0;i<a.size();i++)cout<<a[i]<<" ";
    cout<<endl;
}

void test_empty(){
    cout<<(a.empty()?"empty":"not empty")<<endl;
}

void test_read  (Vector <int> &a){
    int n;
    cin >> n;
    a=Vector <int>(n);
    for(int i=0;i<n;i++) cin>>a[i];
}

void test_0(){
    cout<< "a:"<<endl,test_print(a);
}

void test_1(){
    test_read(b);
    cout<< "b:"<<endl,test_print(b);
}

void test_2(){
    c=b;
    cout<< "c:"<<endl,test_print(c);
}

void test_resize(){
    int n;
    cin>>n;
    a.resize(n);
    test_printsize(a);
    test_printcapacity(a);

}

void test_push()    {
    int n;
    cin >> n;
    b.push_back(n);
    test_print(b);

}

void test_pop()  {  
    c.pop_back();
    test_print(c);
}

void test_back()    {
    cout <<b.back()<<endl;

}

void test_iterator(){
for(Vector <int>::iterator it =b.begin();it!=b.end();++it) 
cout <<*it<<endl;
    cout << endl;
}

int main(){
    cout<<"give an empty vector to a"<<endl;
    test_0();
     cout<<"give a vector to b"<<endl;
    test_1();
    cout<<"let c = b"<<endl;
    test_2();
    cout<<"give a newsize"<<endl;
    test_resize();
    cout<<"print the last element"<<endl;
    test_back();
    cout<<"delete the the last element and print"<<endl;
    test_pop();
    cout<<"add an element and print"<<endl;
    test_push();
    cout<<"empty or not"<<endl;
    test_empty();
    cout<<"iterate the vector b"<<endl;
    test_iterator();
}